package com.example.win.android_banduyujia.ui.view;

import android.content.Context;
import android.media.audiofx.BassBoost;

import com.example.win.android_banduyujia.lib.util.FileUtils;
import com.example.win.android_banduyujia.manager.FileManager;

import java.io.File;

/**
 * Created by Win on 2015/8/18.
 */
public class FileCache {

   private  String  dirString;

    public FileCache(Context context) {
        dirString = getCacheDir();
        boolean  ret = FileUtils.exists(dirString);

    }

    public FileCache(){
        dirString = getCacheDir();
        boolean ret = FileUtils.exists(dirString);

    }

    public String getFileDir(){
        return FileManager.getDownloadFilePath();
    }

    public String getCacheDir() {
        return  FileManager.getSaveFilePath();
    }

    public File getFile(String url) {
        File  f = new File(getSavePath(url));
        return null;
    }

    private String getSavePath(String url) {
        String  filename = String.valueOf(url.hashCode());
        return getCacheDir() + filename;
    }
}
